﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;
using Wicresoft.SMS.Data;

namespace Wicresoft.SMS.Gateway.Host
{
    public class SmsServiceSOAP : ISmsServiceSOAP
    {
        public int SendSMS(string from, string pwd, string text, string[] to)
        {
            IPushMessageProvider _pushMessageProvider = GlobalFactory.CreatePushMessageProvider();
            string addressforSP = "";
            foreach (string number in to)
            {
                addressforSP += (number + ";");
            }
            return _pushMessageProvider.SendSMS(from, pwd, text, addressforSP);
        }
    }
}
